﻿<Page
    x:Class="AudioBackgroundExample.MainPage"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:local="using:AudioBackgroundExample"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    mc:Ignorable="d">

    <Grid Background="{ThemeResource ApplicationPageBackgroundThemeBrush}" Margin="10">
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto"/>
            <RowDefinition Height="Auto"/>
            <RowDefinition Height="Auto"/>
            <RowDefinition Height="*"/>
        </Grid.RowDefinitions>
        <Button Content="Select File to Play" Click="SelectFileOnClick"/>
        <MediaElement x:Name="MediaPlayer" Grid.Row="1"/>
        <TextBlock Text="Initializing..." x:Name="Status" Grid.Row="1" Style="{StaticResource SubheaderTextBlockStyle}"></TextBlock>
        <StackPanel Orientation="Horizontal" Grid.Row="2">
            <AppBarButton x:Name="PlayButton" Icon="Play" Label="Play" Click="PlayOnClick"/>
            <AppBarButton x:Name="PauseButton" Icon="Pause" Label="Pause" Click="PauseOnClick"/>
            <AppBarButton x:Name="StopButton" Icon="Stop" Label="Stop" Click="StopOnClick"></AppBarButton>
        </StackPanel>
    </Grid>
</Page>
